package com.example.demo.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.sql.Timestamp;
import java.util.List;

/**
 * 圈子实体类
 */
@Entity(name = "circle")
public class Circle {
    @Id
    private int id;
    private int userId;
    private String content;
    private String images;
    private String video;
    private Timestamp time;
    private String location;
    private double lon;
    private double lat;
    @OneToMany(mappedBy = "circleId", cascade = CascadeType.ALL)
    private List<CircleLike> likeUsers;

    public List<CircleLike> getLikeUsers() {
        return likeUsers;
    }

    public void setLikeUsers(List<CircleLike> likeUsers) {
        this.likeUsers = likeUsers;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public Timestamp getTime() {
        return time;
    }

    public void setTime(Timestamp time) {
        this.time = time;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public double getLon() {
        return lon;
    }

    public void setLon(double lon) {
        this.lon = lon;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }
}
